get basename without extension Laravel

39

use Illuminate\Support\Str;

$string = Str::of('/foo/bar/baz.jpg')->basename('.jpg');

// 'baz'

Comments

Submit
0 Comments